package com.cwj;

import java.util.*;

/**
 * @author wujie.chen
 * 2021/12/17 15:00
 */
public class 并行流性能 {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < 999; i++) {
            list.add(i);
        }
        Set<String> set = new HashSet<>(100);
        for (int i = 0; i < 100; i++) {
            set.add(UUID.randomUUID().toString());
        }
        System.out.println(set.size());

    }

    // for
    public static void test01(List<Integer> list){
        long l1 = System.currentTimeMillis();
        for (Integer integer : list) {
            task();
        }
        long l2 = System.currentTimeMillis();
        System.out.println(l2 - l1);
    }
    //
    public static void task(){
        double d = 1.0D;
        for (int i = 2; i < 999999999; i++) {
            d *= i;
        }

    }

}
